package com.jd.tuning.jvm.async;

import java.util.Date;

/**
 * 没有异步化
 */
public class Demo {

  private  void subBiz1() throws InterruptedException {
    Thread.sleep(1000L);
    System.out.println(new Date()+"subBiz1");
  }

  private  void subBiz2() throws InterruptedException {
    Thread.sleep(1000L);
    System.out.println(new Date()+"subBiz2");
  }

  private  void saveOpLog() throws InterruptedException {
    Thread.sleep(1000L);
    System.out.println(new Date()+"插入操作日志");
  }

  private  void biz() throws InterruptedException{
    this.subBiz1();
    saveOpLog();
    this.subBiz2();
  }

  public static void main(String[] args) throws InterruptedException {
    new Demo().biz();
  }
}

